Engine
Provides access to the Chromium engine functionality.
To perform operations with the engine, a license key is required. The license key represents a string that can be set via the "jxbrowser.license.key" system property or individually for every Engine
using the licenseKey method. If you set the license key via the system property, then please make sure that you set it before creating an Engine
instance.
The Chromium engine is running in a separate native process. Communication between the native and Java process is done through the Inter-Process Communication (IPC) layer that allows transferring data between two processes on a local machine.
The native process allocates memory and system resources that must be released. So, when the engine is no longer needed, it must be closed through the close method to shutdown the native process and free all the allocated memory and system resources. For example:
Engine engine = Engine.newInstance(engineOptions);
...
engine.close();
Any attempt to use an already closed engine will lead to the IllegalStateException
.
To get notifications that the Engine
instance has been closed subscribe to the following event:
engine.on(EngineClosed.class, event -> {
// The engine has been closed.
});
Engine
instance has been unexpectedly terminated use:
engine.on(EngineCrashed.class, event -> {
// The engine has been unexpectedly terminated.
});
Properties
A store that allows managing cookies.
A service for working with HTTP authentication cache.
Returns a license that was used to create this Engine.
A service that allows managing media stream devices.
A service that allows managing permissions.
A service that allows working with spell checking functionality.
A service that allows working with zoom.
Functions
Browser
instance under the default profile and navigates it to the "about:blank" web page within the defaultTimeout.options
.renderingMode
.Subscribes the given observer to receive events of type E from this Observable.